/* enum */
import { ComponentNameEnum } from '@src/component/business/BizChatPanel/chat/model/enum'
/* scss */
import '@src/component/business/BizChatPanel/chat/components/app-tag/index.scss'
/* vue */
import { defineComponent } from 'vue'

export type ChatAIAppTagProps = {
  
}

export interface ChatAIAppTagSetupState {
  
}

export enum ChatAIAppTagEventEnum {
  Input = 'input',
  Click = 'click'
}

export default defineComponent({
  name: ComponentNameEnum.ChatAIAppTag,
  emits: [
    ChatAIAppTagEventEnum.Input,
    ChatAIAppTagEventEnum.Click,
  ],
  props: {
    value: {
      type: String,
      default: ''
    },
    onClick: {
      type: Function
    }
  },
  setup(props: ChatAIAppTagProps, { slots, emit }) {
    
  },
  computed: {
    
  },
  methods: {
    onInputHandler(value: string) {
      this.$emit(ChatAIAppTagEventEnum.Input, value)
    },
    onClickHandler() {
      this.$emit(ChatAIAppTagEventEnum.Click)
    }
  },
  render() {
    return (
      <div 
        class={ComponentNameEnum.ChatAIAppTag}
        onClick={this.onClickHandler}
      >
        <span>
          {this.value}
        </span>
        <span>
          <i class="iconfont icon-qiehuan1"></i>
        </span>
      </div>
    ) as any
  }
})
